package com.rj.bd.user.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.injector.methods.SelectById;
import com.rj.bd.user.entity.User;
@Repository("userMapper")
public interface UserMapper {

	@Select("select * from login")
	List<User> findAll(User user);
	
	@Select("select * from login where loginId=#{loginId}")
	public User SelectById(String loginId);
	
	@Insert("insert into login values(#{loginId},#{password},#{lName},#{lTime},#{remark},#{lEmail},#{lcode},#{lphone})")
	public void save(User user);

	@Delete("delete from login where loginId=#{loginId}")
	public void delete(User user);

	@Update("update login set password=#{password},lName=#{lName},lTime=#{lTime},remark=#{remark},lEmail=#{lEmail},lcode=#{lcode},lphone=#{lphone} where loginId=#{loginId}")
	public void update(User user);
	
	


	

}
